package Frame.common;
import java.awt.Graphics;
import java.awt.Image;
import java.net.URL;
import javax.swing.ImageIcon;
import javax.swing.JPanel;

public class BackgroundFrame extends JPanel {
	private static final long serialVersionUID = 112089375864334074L;
	ImageIcon icon;
	Image img;
	public BackgroundFrame(URL x) {
		icon = new ImageIcon(x);
		img = icon.getImage();
	}  
	@Override
	public void paintComponent(Graphics g) {
		super.paintComponent(g); 
		g.drawImage(img, 0, 0, this.getWidth(), this.getHeight(), this);
	}
	  
}
